<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="/WEB-INF/mytag.tld" prefix="f"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";

	int pageNum = (Integer) request.getAttribute("pageNum");
	int allpage = (Integer) request.getAttribute("allpage");
	int allCounts = (Integer) request.getAttribute("allCounts");
	List allUser = (List) request.getAttribute("allUser");
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML>
	<HEAD>
		<base href="<%=basePath%>">
		<TITLE>北京 17113.cc</TITLE>
		<META http-equiv=Content-Type content="text/html; charset=gb2312">
		<LINK href="css/style.css" type=text/css rel=stylesheet>
		<script language="javascript" src="admin/js/calander.js"></script>
		<META content="MSHTML 6.00.3790.2440" name=GENERATOR>
	</HEAD>
	<BODY text=#000000 bgColor=#ffffff leftMargin=0 topMargin=7>
		<TABLE cellSpacing=0 cellPadding=0 width=800 align=center border=0>
			<TBODY>
				<TR>
					<TD align="center">						
						<IMG height=59 src="admin/img/logo-r.gif">
					</TD>
				</TR>
				<TR>
					<TD vAlign=top background=images/list-bg.jpg>
						<BR>
						<BR>
						<TABLE cellSpacing=0 cellPadding=0 width="100%" align=center border=0>	
								<TR>
									<TD>
										<form method="post" action="/doUser.do?opers=getAllUser">
											<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
												<TR>
													<td colspan=2 align="center" bgColor=#b4b4b4 height=24>
														<font size="3">用户信息查询</font>																					
													</td>
												</TR>
												<TR>
													<td align=center>
														&nbsp;&nbsp;按状态查询：<select name="flag" id="flag">
															<option value="2" <%=request.getParameter("flag").equals("2") ? "selected"
							: ""%>>所有</option>
															<option value="1" <%=request.getParameter("flag").equals("1") ? "selected"
							: ""%>>正常状态</option>
															<option value="0" <%=request.getParameter("flag").equals("0") ? "selected"
							: ""%>>已删除用户</option>
														</select>
														&nbsp;&nbsp;||&nbsp;&nbsp;按注册日期查询：
														开始日期:<input type="text" name="startTime" id="startTime" size="10" onclick="new Calendar(null, null, 1).show(this);"
										readonly="readonly" value="<%=request.getParameter("startTime") == null ? "" : request.getParameter("startTime") %>"/>
														&nbsp;&nbsp;结束日期:<input type="text" name="endTime"  id="endTime" size="10" onclick="new Calendar(null, null, 1).show(this);"
										readonly="readonly" value="<%=request.getParameter("endTime") == null ? "" : request.getParameter("endTime") %>"/>
													</td>
													<td align=center>
														<input type="submit" value="查询" />
													</td>													
												</TR>
												<TR>
													<td  align=center>
														&nbsp;&nbsp;按编号查询：<input type="text" size="33" name="uid" id="uid" value="<%=request.getParameter("uid") == null ? "" : request.getParameter("uid") %>"/>&nbsp;&nbsp;||												
														&nbsp;&nbsp;按帐号查询：<input type="text" name="account" id="account" value="<%=request.getParameter("account") == null ? "" : request.getParameter("account") %>"/>	
													</td>
													<td align=center>
														[
														<A style="FONT-SIZE: 12pt; COLOR: #000099"
															href="/admin/adminIndex.jsp">返回控制台</A>]
													</td>
												</TR>
										</TABLE>
										</form>
									</TD>
								</TR>
								<tr>
									<td>
										<table width="100%" border="1" cellspacing="1" cellpadding="0"
											bgcolor="737373" bordercolor="#FFFFFF">
											<tr>
												<td>
													<table width="100%" border="0" cellspacing="0"
														cellpadding="0">
														<tr>
															<td bgcolor="B4B4B4" height="20" align="center">
																总共<%=allCounts%>条 第<%=pageNum%>/<%=allpage%>页（每页显示20条）
															</td>
														</tr>
													</table>
												</td>
											</tr>
										</table>
									</td>
								</tr>
								<TR>
									<TD>
										<TABLE cellSpacing=0 cellPadding=1 width="100%" border=1>
											<TBODY>
												<TR align="center">	
													<TD class=text width=160 bgColor=#eff8e0 height=25>
														编号
													</TD>																							
													<TD class=text width=80 bgColor=#eff8e0 height=25>
														帐号
													</TD>
													
													<TD class=text width=200 bgColor=#eff8e0 height=25>
														电子邮件
													</TD>
													<TD class=text width=150 bgColor=#eff8e0 height=25>
														注册日期
													</TD>
													<TD class=text width=100 bgColor=#eff8e0 height=25>
														状态
													</TD>
													<TD class=text width=100 bgColor=#eff8e0 height=25>
														操作
													</TD>
												</TR>
												<c:forEach var="user" items="<%=allUser%>">
													<TR align="center">
														<TD width=160 bgColor=#ffffff>
															${user.id}
														</TD>
														<TD width=80 bgColor=#ffffff>
															${user.account}
														</TD>
														
														<TD width=200 bgColor=#ffffff>
															${user.email}
														</TD>	
														<TD width=150 bgColor=#ffffff>
															${user.regDate}
														</TD>
														<TD width=100 bgColor=#ffffff>
															<c:if test="${user.dr=='0' }">
															已删除
															</c:if>
															<c:if test="${user.dr=='1' }">
															正  常
															</c:if>
														</TD>													
														<td width=100 bgColor=#ffffff>															
															<c:if test="${user.dr=='0' }">
															<a href="doUser.do?opers=delete&flag=1&id=${user.id}">恢复</a>
															</c:if>
															<c:if test="${user.dr=='1' }">
															<a href="doUser.do?opers=delete&flag=0&id=${user.id}">删除</a>
															</c:if>
														</td>													
													</TR>
												</c:forEach>
											</TBODY>
										</TABLE>
									</TD>
								</TR>
						<tr>
							<td>
								<table width="100%" border="1" cellspacing="1" cellpadding="0"
									bgcolor="737373" bordercolor="#FFFFFF">
									<tr>
										<td>
											<table width="100%" border="0" cellspacing="0"
												cellpadding="0">
												<tr>
													<td bgcolor="B4B4B4" height="20" align="center">
														<f:fenye className="doUser" para="opers" functionName="getAllUser&flag=${param.flag}&startTime=${param.startTime }&endTime=${param.endTime }&uid=${param.uid }&account=${param.account }"
															pageNum="<%=pageNum%>" totalPage="<%=allpage%>" />
													</td>
												</tr>
											</table>
										</td>
									</tr>
								</table>
							</td>
						</tr>								
						</TABLE>
						<BR>
					</TD>
				</TR>
			</TBODY>
		</TABLE>	
		<TABLE cellSpacing=0 cellPadding=5 width=800 align=center border=0>
			<TBODY>
				<TR>
					<TD bgColor=#b4b4b4 height=10>
						&nbsp;
					</TD>
				</TR>
				<TR>
					<TD align=middle>
						版权所有®2011 北京17113.cc. 保留所有权利. 冀ICP备11028198号
					</TD>
				</TR>
			</TBODY>
		</TABLE>
	</BODY>
</HTML>





